<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  
 </head>
 <body>
  <script>
function fun1(){            	//无参数
    document.write('无参数');
    document.write('<br/>');
}
fun1();

function fun2(a,b){      	//两个参数
    document.write('两个参数a='+a+',b='+b);
    document.write('<br/>');
}
fun2('hello','世界');

function fun3(...param){  	//变长参数
    len = param.length;
    for(i=0;i<len;i++){
        document.write('参数'+i+'='+param[i]);
        document.write(',');
    }
}
fun3(1,3,5,7,9);

  </script>
 </body>
</html>
